extends layout
block css
  link(rel='stylesheet', href='../assets/css/article-wrapper-main.css')
  link(rel='stylesheet', href='../assets/css/header.css')
  link(rel='stylesheet', href='../assets/css/menu.css')
  link(rel='stylesheet', href='../assets/css/article.css')
  link(rel='stylesheet', href='../assets/css/github-markdown.css')
block main
  include header
  #wrapper-main(ng-app='article',ng-controller='articleCon')
    // Main
    div#loading.animated(ng-class='{true:"fadeOut",false:""}[isShow]')
      include loading
    #main-main
      // Post
      article.post(ng-if='!post')
        h2 {{prompt||"啊哦，没有获取成功，再试一次吧 "}}
      article.post(ng-if='post')
        header
          .title
            h2
              a(href='{{post.url}}') {{post.title}}
          //-   p 这是测试这是测试这是测试这是测试
          .meta
            time.published(datetime='2015-11-01') {{post.time}}
            a.author(href='/about')
              span.name ZSK
              img(src='images/avatar.jpg', alt='')
        a.image.featured()
          img(src='{{post.showImg}}', alt='')
        p
          | {{post.simIntro}}
        div(ng-bind-html='post.content',class='markdown-body')

        div#previous-comments
          div.com-h
            h2 评论
          div.comment.panel.panel-default(ng-repeat='comment in comments')
            div.panel-heading {{comment.nickname}}
            div.panel-body {{comment.commentDetail}}
        div#comment
          div#comment-head
            h2 我要评论
          textarea#comment-area(placeholder='......',ng-model='commentDetail')
          input#mail(type='text',placeholder='评论请输入邮箱哦',ng-model='mail')
          input#nickname(type='text',placeholder='评论请输入昵称',ng-model='nickname')
          button#submit-btn(ng-click='submit(commentDetail,mail,post.articleId,post.commentNum+1,nickname)') 提交
          div#prompt
        footer
          ul.actions
            li
          ul.stats
            li
              a(href='#') General
            li
              a.icon.fa-heart(href='#') {{post.loveNum}}
            li
              a.icon.fa-comment(href='#') {{comments.length}}

      // Pagination
      ul.actions.pagination
        li
          a.disabled.button.big.previous(href='') Previous Page
        li
          a.button.big.next(href='#') Next Page
block js
  script(src='../assets/js/jquery.min.js')
  //script(src='../assets/js/angular.js')
  script(src='../assets/js/skel.min.js')
  script(src='../assets/js/util.js')
  //if lte IE 8
    script(src='../assets/js/ie/respond.min.js')
  script(src='../assets/js/article.js')
  script(src='../assets/js/main.js')